<template>
  <div>

			<table>
					<tr >
						<td style="padding:5px;">

							用户名:

						</td>
						<td style="padding:5px;">

							<input type="text" v-model="username" />

						</td>
					</tr>

					<tr>
						<td style="padding:5px;">

							密码:

						</td>
						<td style="padding:5px;">

							<input type="password" v-model="password" />

						</td>
					</tr>

          <tr>
            <td style="padding:5px;">


              </td>
              <td style="padding:5px;">



              </td>
              <td style="padding:5px;">



						</td>
          </tr>

					<tr>
						<td style="padding:5px;">


						</td>
						<td style="padding:5px;">

							<Button @click="submit">提交</Button> &nbsp;&nbsp;


						</td>
					</tr>

			</table>




	<footer class="footer">



	</footer>

  </div>

</template>



<script>



export default {
  data () {
    return {
      msg: "这是一个变量",
      username:'',
      password:'',

    }
  },

  mounted:function(){

},
  methods:{

  	//提交注册
  	submit:function(){

  		if(this.username == ''){

  			//alert('用户名不能为空');
  			this.$Message('用户名不能为空');
  			return false;
  		}

  		if(this.password == ''){

  			//alert('用户名不能为空');
  			this.$Message('密码不能为空');
  			return false;
  		}

  		//发送请求
  		this.axios.get('http://localhost:8000/mdregister/',{params:{username:this.username,password:this.password,code:this.code}}).then((result) =>{

  						console.log(result);
  						this.$Message(result.data.message);


  		});



  	}


  }
}


</script>

<style>



</style>
